<template>
    <div id="member">
        

        <!-- 列表 -->
        <el-table
            :data="tableData"
            style="width: 100%">
            <el-table-column
                prop="name"
                label="套餐名称"
                width="200"
                >
            </el-table-column>
            
            <template    v-for="(item,index) of tableData.vipListHeader">
                    <el-table-column
                    :key="index"
                    :label="item.vip_rule_name"
                    
                        >
                        <template slot-scope="scope">
                            <div v-for="(val,key) of scope.row.vip_rule_list" :key="key">
                                <span v-if="val.id==item.id">{{val.value}}</span>
                            </div>
                        </template>
                    </el-table-column>
            </template>
            
        </el-table>

    </div>
</template>
<script>
export default {
    name:'member',
    data() {
        return {
            tableData: [{status:true}],
            
        }
    },
    methods: {      
        pageChange(e){
			//翻页
			this.page=e;
			this.getUserRightsList();
        },
        async getUserRightsList(){
            let res=await this.$api.getUserRightsList();
            if(res.data.level=='success'){
                this.tableData=res.data.data;

                this.tableData.vipListHeader=res.data.data[0].vip_rule_list;//获取表头
            }
        },
 


        initData(){

        }

    },
    mounted() {
        this.getUserRightsList();
    },
}
</script>
<style lang="scss" scoped>
.screen{
          margin-top: -10px !important;
      }
    .action-bar{
			background-color: #f2f2f2;
			height: 60px;
			margin: 10px 0px;
			box-sizing: border-box;
			display: flex;
			align-items: center;
			padding-left: 20px;
			.action-bar-input{
				width: 250px;
				margin-right: 14px;
      }
      .task-form-text{
				color: #666666;
			}
		}
		.el-table-style{
			width: 100%;
			border: 1px solid #f2f2f2;
		}
		.footer-bar{
			display: flex;
			justify-content: space-between;
			align-items: center;
			background: #f2f2f2;
			padding: 8px;
			margin: 10px 0px;
			box-sizing: border-box;
		}
		.dialog-footer{
			text-align: center;
		}
		.executorList{
			display: flex;
			flex-wrap: wrap;
			div{
				margin:10px;
				border:1px solid #eee;
				border-radius: 5px;
				padding:5px 10px;
			}
		}

        .avatar-uploader-icon {
		font-size: 28px;
		color: #8c939d;
		width: 178px;
		height: 178px;
		line-height: 178px;
		text-align: center;
		border: 1px dashed #d9d9d9;
	}
	.avatar {
		width: 178px;
		height: 178px;
		display: block;
		object-fit: contain;
	}
    .add-table-wrapper{
        display: flex;
        justify-content: center;
        padding:30px 0; 
    }
</style>